<template>
<div>
  <el-card>
    <Category @getCategoryId="getCategoryId" />
  </el-card>

  <el-card style="margin: 10px 0px">
    2222
  </el-card>
</div>
</template>

<script>
import lo from 'lodash'

export default {
  name: "Attr",
  data() {
    return {
      category1Id : '',
      category2Id : '',
      category3Id : '',
    }
  },
  methods: {
     async getCategoryId({id, flag}) {
        switch (flag) {
          case 1:
            this.category1Id = id;
            this.category2Id = '';
            this.category3Id = '';
            break;
          case 2:
            this.category2Id = id;
            this.category3Id = '';
            break;
          case 3:
            this.category3Id = id;
            break;
        }
        //
        let res = await this.$ajax.attr.reqAttrInfoList(this.category1Id,this.category2Id,this.category3Id);
       console.log(res);
    }
  }
}
</script>

<style scoped>

</style>
